import axios from 'axios'

import {initialSong} from './song'

export const getsongList = info => {
    var _url = '';
    if (info.type === 'songList') {
        _url = '/playlist/detail?id='
    }

    return axios.get(_url + info.id)
}
// 初始化列表格式
export const initialList = array =>{
    var newList = array.map(element => {
        return initialSong(element)
    });
    
    return newList;
}
